package com.yyq.gxdc.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yyq.gxdc.entity.ReceiveCoupon;
import com.yyq.gxdc.mapper.ReceiveCouponMapper;
import com.yyq.gxdc.service.IReceiveCouponService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 */
@Service
public class ReceiveCouponServiceImpl extends ServiceImpl<ReceiveCouponMapper, ReceiveCoupon> implements IReceiveCouponService {

    @Resource
    private ReceiveCouponMapper receiveCouponMapper;

    @Override
    public IPage<ReceiveCoupon> getAllReceiveCoupon(Page<ReceiveCoupon> page, ReceiveCoupon receiveCoupon){
        IPage<ReceiveCoupon> allCollect = receiveCouponMapper.getAllReceiveCoupon(page, receiveCoupon);
        return  allCollect;
    };

    @Override
    public ReceiveCoupon findByUidAndRid(ReceiveCoupon receiveCoupon){
        ReceiveCoupon byUidAndRid = receiveCouponMapper.findByUidAndRid(receiveCoupon);
        return byUidAndRid;
    }
}
